<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>js函数</title>

</head>
<body>

</body>
<script>
    function add(a, b) {
        return a + b;
    }
    let result = add(10, 20);
    alert( result);

    alert( add(10, 30, 50))

    var add = function (a, b) {
        return a + b;
    }
    var add2 = (a, b) => a + b;

    console.log( add(10, 20))
    console.log( add2(10, 20))

    (function (a,b) {console.log( a + b)})(10, 40);
    (a,b) => console.log( a + b)(10, 50);
</script>
</html>